package com.xxx.test;

import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
import com.xxx.config.WxPayConfig;

import javax.annotation.Resource;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.security.PrivateKey;

public class Demo {
    @Resource
    //private WxPayConfig wxPayConfig;
    public static void main(String[] args) throws FileNotFoundException {
        // 加载商户私钥（privateKey：私钥字符串）
        PrivateKey merchantPrivateKey = PemUtil
                .loadPrivateKey(new FileInputStream("apiclient_key.pem"));
        System.out.println(merchantPrivateKey);
    }
}
